import request from "../utils/request";

//部门列表查询
export const queryAllApi = () => {
    return request.get('/depts')
}

// 新增部门
export const addApi = (dept) => {
    return request.post('/depts',dept)
}

// 修改部门-根据ID查询部门
export const queryByIdApi = (id) => {
    return request.get(`/depts/${id}`)
}

// 修改部门-保存部门
export const updateApi = (dept) => {
    return request.put('/depts',dept)
}


// 删除部门
export const deleteByIdApi = (id) => {
    return request.delete(`/depts?id=${id}`)
}